/**
 * Created by denh on 16/7/27.
 */
//滚动显示
 $(window).on("scroll", function() {
            var scrollTop = $(document).scrollTop();
            var itemOffTop = $(".downoned").offset().top+$(".downoned").height();
            if(scrollTop>=itemOffTop){
                $("footer").show();
            }else{
                $("footer").hide();
            }
})

//判断下载地址
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isAndroid)
{
    $(".downoneda").attr("href","http://static.cyyzjk.com/babydr-app20160718-v1.0-rewrite");
}
if(isiOS)
{
    $(".downoneda").attr("href","http://a.app.qq.com/o/simple.jsp?pkgname=com.babydr.app");
}

(function(win,doc){
    function change(){
    doc.documentElement.style.fontSize=doc.documentElement.clientWidth/375*23.4375+'px';
}
    change();
    win.addEventListener('resize',change,false);   
})(window,document);